import request from "@/utils/request"
//获取销售额统计
export const Salesstatistics = (collectType,start,end) => {
  return request.get('/api/order-service/report/amountCollect/', {
    params: {
      collectType,
      start,
      end
    }
  
  })
}
//获取销售统计 订单量
export const gongdanStatistics = (start,end) => {
  return request.get('api/order-service/report/orderCount', {
    params: {
      start,
      end
    }
  })
}
//获取销售统计 销售额
export const gongdanStatistics1 = (start,end) => {
  return request.get('api/order-service/report/orderAmount', {
    params: {
      start,
      end
    }
  })
}
//获取工单统计
export const gongdan = (start,end) => {
  return request.get(`/api/task-service/task/taskReportInfo/${start}/${end}`)
}

//获取销售前几的商品
export const goods = (topvalue,start,end) => request.get(`/api/order-service/report/skuTop/${topvalue}/${start}/${end}`)

//获取工单详情运营
export const gdDetails = (pageIndex,status,taskCode) => request.get('/api/task-service/task/search', {
  params: {
    pageIndex,
    pageSize: 10,
    status,
    isRepair: false,
    taskCode
  }
})
//获取运营工单详情运营
export const gdDetails1 = (pageIndex,status, taskCode) => request.get('/api/task-service/task/search', {
  params: {
    pageIndex,
    pageSize: 10,
    status,
    isRepair: true,
    taskCode
  }
})

//获取工单状态列表
export const gdliebiao = (statusId,statusName) => request.get('/api/task-service/task/allTaskStatus', {
  params: {
    statusId,
    statusName
  }
})
//创建工单
export const gdCreate = (data) => request.get('/api/task-service/task/create', {
  params: {
    data
  }
})
//获取工单类型
export const gdType = () => request.get('/api/task-service/taskType/list')

//获取工单详情
export const gdxiang = (id) => request.get(`/api/task-service/task/taskInfo/${id}`)
//取消工单\
export const gdcancel = (id) => request.post(`/api/task-service/task/cancel/${id}`, {
  headers: {
    "Content-Type":"application/json"
  }
})
//编辑工单
export const gdedit = (data) => request.post('/api/task-service/task/create', {
  headers: {
    "Content-Type":"application/json"
  },
  data
})